<template>
  <div class="app-container">
<!--    <el-form :model="queryParams" ref="queryRef" :inline="true" label-width="90px">-->
<!--      <el-form-item label="昵称" prop="nicknameOrUsername">-->
<!--        <el-input v-model="queryParams.nicknameOrUsername" placeholder="请输入" clearable style="width: 240px"-->
<!--          @keyup.enter="handleQuery" />-->
<!--      </el-form-item>-->
<!--      <el-form-item>-->
<!--        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>-->
<!--        <el-button icon="Refresh" @click="resetQuery">重置</el-button>-->
<!--      </el-form-item>-->
<!--    </el-form>-->

<!--    <el-row :gutter="10" class="mb8">-->
<!--      <el-col :span="1.5">-->
<!--        <el-button type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>-->
<!--      </el-col>-->
<!--    </el-row>-->

    <page-table :url="url.list" ref="table" :tableForm="queryParams" :columns="columns">
      <template #action="scope">
        <el-tooltip content="修改" placement="top">
          <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>
        </el-tooltip>
        <el-tooltip content="设置数据权限" placement="top">
          <el-button link type="primary" icon="CircleCheck" @click="handleDataScope(scope.row)"></el-button>
        </el-tooltip>
      </template>
      <template #status="scope">
        <el-switch v-model="scope.row.status" v-if="scope.row.status != undefined" :active-value="1" :inactive-value="0"
          @change="handleDelete(scope.row, scope.row.status)"></el-switch>
      </template>
    </page-table>


  </div>
</template>

<script setup name="Role">
import request from '@/utils/request'
const router = useRouter();
const { proxy } = getCurrentInstance();

const url = ref({
  list: 'log/getPage/forManager',
});

const title = ref("");
const table = ref(null);

const columns = ref([{
  key: 'logs',
  title: '操作记录',
  ellipsis: false,
  tooltip: false,

},
{
  key: 'createTime',
  title: '日期',
  ellipsis: true,
  tooltip: true,
  width: 200
},{
    key: 'createBy',
    title: '操作人',
    ellipsis: true,
    tooltip: true,
    width: 100
  }
]);


/** 查询列表 */
function getList() {
  table.value.onload();
}
/** 搜索按钮操作 */
function handleQuery() {
  table.value.init();
}
/** 重置按钮操作 */
function resetQuery() {
  proxy.resetForm("queryRef");
  handleQuery();
}






</script>
